/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.jomijushi.fid.dominio;

import java.io.Serializable;
import java.util.Date;
import java.util.List;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 *
 * @author miguel
 */
@Entity
@Table(name = "fid_bobina_usada", catalog = "fid", schema = "")
@NamedQueries({@NamedQuery(name = "FidBobinaUsada.findAll", query = "SELECT f FROM FidBobinaUsada f"), @NamedQuery(name = "FidBobinaUsada.findById", query = "SELECT f FROM FidBobinaUsada f WHERE f.id = :id"), @NamedQuery(name = "FidBobinaUsada.findByFechaIngreso", query = "SELECT f FROM FidBobinaUsada f WHERE f.fechaIngreso = :fechaIngreso"), @NamedQuery(name = "FidBobinaUsada.findByFechaSalida", query = "SELECT f FROM FidBobinaUsada f WHERE f.fechaSalida = :fechaSalida"), @NamedQuery(name = "FidBobinaUsada.findByAreaUsada", query = "SELECT f FROM FidBobinaUsada f WHERE f.areaUsada = :areaUsada"), @NamedQuery(name = "FidBobinaUsada.findByCreatedAt", query = "SELECT f FROM FidBobinaUsada f WHERE f.createdAt = :createdAt"), @NamedQuery(name = "FidBobinaUsada.findByUpdatedAt", query = "SELECT f FROM FidBobinaUsada f WHERE f.updatedAt = :updatedAt")})
public class FidBobinaUsada implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(name = "id")
    private Integer id;
    @Column(name = "fechaIngreso")
    @Temporal(TemporalType.TIMESTAMP)
    private Date fechaIngreso;
    @Column(name = "fechaSalida")
    @Temporal(TemporalType.TIMESTAMP)
    private Date fechaSalida;
    @Column(name = "areaUsada")
    private Double areaUsada;
    @Column(name = "created_at")
    @Temporal(TemporalType.TIMESTAMP)
    private Date createdAt;
    @Column(name = "updated_at")
    @Temporal(TemporalType.TIMESTAMP)
    private Date updatedAt;
    @JoinColumn(name = "fid_bobina_id", referencedColumnName = "id")
    @ManyToOne
    private FidBobina fidBobinaId;
    @OneToMany(mappedBy = "fidBobinaUsadaId")
    private List<FidItemVentaImpresion> fidItemVentaImpresionList;

    public FidBobinaUsada() {
    }

    public FidBobinaUsada(Integer id) {
        this.id = id;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Date getFechaIngreso() {
        return fechaIngreso;
    }

    public void setFechaIngreso(Date fechaIngreso) {
        this.fechaIngreso = fechaIngreso;
    }

    public Date getFechaSalida() {
        return fechaSalida;
    }

    public void setFechaSalida(Date fechaSalida) {
        this.fechaSalida = fechaSalida;
    }

    public Double getAreaUsada() {
        return areaUsada;
    }

    public void setAreaUsada(Double areaUsada) {
        this.areaUsada = areaUsada;
    }

    public Date getCreatedAt() {
        return createdAt;
    }

    public void setCreatedAt(Date createdAt) {
        this.createdAt = createdAt;
    }

    public Date getUpdatedAt() {
        return updatedAt;
    }

    public void setUpdatedAt(Date updatedAt) {
        this.updatedAt = updatedAt;
    }

    public FidBobina getFidBobinaId() {
        return fidBobinaId;
    }

    public void setFidBobinaId(FidBobina fidBobinaId) {
        this.fidBobinaId = fidBobinaId;
    }

    public List<FidItemVentaImpresion> getFidItemVentaImpresionList() {
        return fidItemVentaImpresionList;
    }

    public void setFidItemVentaImpresionList(List<FidItemVentaImpresion> fidItemVentaImpresionList) {
        this.fidItemVentaImpresionList = fidItemVentaImpresionList;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (id != null ? id.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof FidBobinaUsada)) {
            return false;
        }
        FidBobinaUsada other = (FidBobinaUsada) object;
        if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.jomijushi.fid.dominio.FidBobinaUsada[id=" + id + "]";
    }

}
